﻿@model Uco.Models.Form
@{
    Layout = @Model.Layout;
    Uco.Models.ContactForm cf = new Uco.Models.ContactForm();
}

<h1>@(ViewBag.H1)</h1>
<div class="form_r">
@Html.Raw(Model.Text)
<br /><br />
@using (Ajax.BeginForm("Form", "Page", new AjaxOptions
{
    UpdateTargetId = "form_update",
    InsertionMode = InsertionMode.Replace,
    LoadingElementId = "form_loading",
    HttpMethod = "POST"
}))
{
    <div class="contact_form contact_form_@(ViewBag.ID)" id="form_update">
        <div class="row">
            <div class="editor-label">
                @Html.LabelFor(model => cf.ContactName):</div>
            <div class="editor-field">
                @Html.EditorFor(model => cf.ContactName)
                @Html.ValidationMessageFor(model => cf.ContactName)
            </div>
        </div>
        <div class="row">
            <div class="editor-label">
                @Html.LabelFor(model => cf.ContactPhone):</div>
            <div class="editor-field">
                @Html.EditorFor(model => cf.ContactPhone)
                @Html.ValidationMessageFor(model => cf.ContactPhone)
            </div>
        </div>
        <div class="row">
            <div class="editor-label">
                @Html.LabelFor(model => cf.ContactEmail):</div>
            <div class="editor-field">
                @Html.EditorFor(model => cf.ContactEmail)
                @Html.ValidationMessageFor(model => cf.ContactEmail)
            </div>
        </div>
        <div class="row">
            <div class="editor-label">
                @Html.LabelFor(model => cf.ContactData):</div>
            <div class="editor-field">
                @Html.EditorFor(model => cf.ContactData)
                @Html.ValidationMessageFor(model => cf.ContactData)
            </div>
        </div>
        <div class="editor-button">
            @Html.Partial("_InvisibleCaptcha", new Uco.Models.InvisibleCaptcha())
            <input type="hidden" value="@Model.ID" name="FormID" id="FormID" />
            <input type="submit" value="Send" class="button1" />
            <span id="form_loading" class="dn">...Loading...</span> 
        </div>
    </div>
}
</div>
<div class="form_l">
    @Html.DisplayFor(model => model.Pic, "Map")
</div>
<div class="clear"></div>